117 #define XMC_I2C0_CH0 XMC_USIC0_CH0 118 #define XMC_I2C0_CH1 XMC_USIC0_CH1 122 #define XMC_I2C1_CH0 XMC_USIC1_CH0 123 #define XMC_I2C1_CH1 XMC_USIC1_CH1 127 #define XMC_I2C2_CH0 XMC_USIC2_CH0 128 #define XMC_I2C2_CH1 XMC_USIC2_CH1 131 #define XMC_I2C_10BIT_ADDR_GROUP (0x7800U) 228 #if UC_FAMILY == XMC1 229 XMC_I2C_CH_INPUT_SDA1 = 3U,
230 XMC_I2C_CH_INPUT_SDA2 = 5U,
233 #if UC_FAMILY == XMC1 234 XMC_I2C_CH_INPUT_SCL1 = 4U
362 const uint8_t service_request)
389 const uint32_t service_request)
392 (uint32_t)service_request);
621 return((uint8_t)((channel->
RBUF) >> 8U));
678 channel->
PSCR |= flag;
701 const uint32_t oversampling,
#define USIC_CH_PCR_IICMode_ARLIEN_Msk
__STATIC_INLINE void XMC_I2C_CH_ConfigExternalInputSignalToBRG(XMC_USIC_CH_t *const channel, const uint16_t pdiv, const uint32_t oversampling, const XMC_USIC_CH_INPUT_COMBINATION_MODE_t combination_mode)
struct XMC_I2C_CH_CONFIG XMC_I2C_CH_CONFIG_t
I2C_CH configuration structure.
XMC_I2C_CH_INPUT
I2C input stage selection.
__IO uint32_t PSR_IICMode
__STATIC_INLINE void XMC_I2C_CH_SetInputSource(XMC_USIC_CH_t *const channel, const XMC_I2C_CH_INPUT_t input, const uint8_t source)
enum XMC_USIC_CH_INPUT XMC_USIC_CH_INPUT_t
XMC_I2C_CH_STATUS
I2C Status.
XMC_I2C_CH_INTERRUPT_NODE_POINTER
void XMC_USIC_CH_SetInterruptNodePointer(XMC_USIC_CH_t *const channel, const XMC_USIC_CH_INTERRUPT_NODE_POINTER_t interrupt_node, const uint32_t service_request)
__STATIC_INLINE void XMC_USIC_CH_SetMode(XMC_USIC_CH_t *const channel, const XMC_USIC_CH_OPERATING_MODE_t mode)
enum XMC_I2C_CH_STATUS XMC_I2C_CH_STATUS_t
I2C Status.
#define USIC_CH_PCR_IICMode_ACKIEN_Msk
I2C_CH configuration structure.
void XMC_I2C_CH_SetSlaveAddress(XMC_USIC_CH_t *const channel, const uint16_t address)
#define USIC_CH_PCR_IICMode_SCRIEN_Msk
enum XMC_I2C_CH_INTERRUPT_NODE_POINTER XMC_I2C_CH_INTERRUPT_NODE_POINTER_t
__STATIC_INLINE void XMC_USIC_CH_SetStartTransmisionMode(XMC_USIC_CH_t *const channel, const XMC_USIC_CH_START_TRANSMISION_MODE_t start_transmision_mode)
__STATIC_INLINE void XMC_I2C_CH_EnableAcknowledgeAddress0(XMC_USIC_CH_t *const channel)
__STATIC_INLINE void XMC_I2C_CH_TriggerServiceRequest(XMC_USIC_CH_t *const channel, const uint32_t service_request_line)
#define USIC_CH_PSR_IICMode_NACK_Msk
uint16_t XMC_I2C_CH_GetSlaveAddress(const XMC_USIC_CH_t *const channel)
XMC_I2C_CH_RECEIVER_STATUS_FLAG
I2C receiver status. The received data byte is available at the bit positions RBUF[7:0], whereas the additional information is monitored at the bit positions RBUF[12:8].
void XMC_I2C_CH_Init(XMC_USIC_CH_t *const channel, const XMC_I2C_CH_CONFIG_t *const config)
__STATIC_INLINE uint8_t XMC_I2C_CH_GetReceiverStatusFlag(XMC_USIC_CH_t *const channel)
__STATIC_INLINE void XMC_I2C_CH_Start(XMC_USIC_CH_t *const channel)
enum XMC_I2C_CH_RECEIVER_STATUS_FLAG XMC_I2C_CH_RECEIVER_STATUS_FLAG_t
I2C receiver status. The received data byte is available at the bit positions RBUF[7:0], whereas the additional information is monitored at the bit positions RBUF[12:8].
void XMC_I2C_CH_MasterStart(XMC_USIC_CH_t *const channel, const uint16_t addr, const XMC_I2C_CH_CMD_t command)
XMC_I2C_CH_STATUS_t XMC_I2C_CH_Stop(XMC_USIC_CH_t *const channel)
#define USIC_CH_PSR_IICMode_RSCR_Msk
#define USIC_CH_PCR_IICMode_ACK00_Msk
__STATIC_INLINE void XMC_I2C_CH_SelectInterruptNodePointer(XMC_USIC_CH_t *const channel, const XMC_I2C_CH_INTERRUPT_NODE_POINTER_t interrupt_node, const uint32_t service_request)
#define USIC_CH_PCR_IICMode_MCLK_Msk
uint8_t XMC_I2C_CH_GetReceivedData(const XMC_USIC_CH_t *const channel)
#define USIC_CH_CCR_BRGIEN_Msk
__STATIC_INLINE void XMC_USIC_CH_TriggerServiceRequest(XMC_USIC_CH_t *const channel, const uint32_t service_request_line)
#define USIC_CH_PSR_IICMode_AIF_Msk
enum XMC_I2C_CH_EVENT XMC_I2C_CH_EVENT_t
I2C events.
enum XMC_USIC_CH_INTERRUPT_NODE_POINTER XMC_USIC_CH_INTERRUPT_NODE_POINTER_t
#define USIC_CH_PSR_IICMode_RSIF_Msk
__STATIC_INLINE void XMC_I2C_CH_DisableMasterClock(XMC_USIC_CH_t *const channel)
void XMC_I2C_CH_MasterStop(XMC_USIC_CH_t *const channel)
#define USIC_CH_PSR_IICMode_BRGIF_Msk
#define USIC_CH_PCR_IICMode_PCRIEN_Msk
__STATIC_INLINE void XMC_I2C_CH_EnableMasterClock(XMC_USIC_CH_t *const channel)
#define USIC_CH_PSR_IICMode_ERR_Msk
#define USIC_CH_PSR_IICMode_TSIF_Msk
#define USIC_CH_DX0CR_DSEN_Msk
XMC_I2C_CH_STATUS_FLAG
I2C status.
#define USIC_CH_CCR_DLIEN_Msk
__STATIC_INLINE void XMC_I2C_CH_SetInterruptNodePointer(XMC_USIC_CH_t *const channel, const uint8_t service_request)
enum XMC_I2C_CH_STATUS_FLAG XMC_I2C_CH_STATUS_FLAG_t
I2C status.
#define USIC_CH_CCR_TSIEN_Msk
XMC_I2C_CH_EVENT
I2C events.
void XMC_I2C_CH_DisableEvent(XMC_USIC_CH_t *const channel, uint32_t event)
__STATIC_INLINE void XMC_I2C_CH_EnableDataTransmission(XMC_USIC_CH_t *const channel)
#define USIC_CH_CCR_RSIEN_Msk
#define USIC_CH_PCR_IICMode_NACKIEN_Msk
XMC_I2C_CH_STATUS_t XMC_I2C_CH_SetBaudrate(XMC_USIC_CH_t *const channel, const uint32_t rate)
#define USIC_CH_CCR_AIEN_Msk
#define USIC_CH_PSR_IICMode_WTDF_Msk
#define USIC_CH_DX0CR_INSW_Msk
#define USIC_CH_CCR_TBIEN_Msk
void XMC_I2C_CH_MasterRepeatedStart(XMC_USIC_CH_t *const channel, const uint16_t addr, const XMC_I2C_CH_CMD_t command)
XMC_I2C_CH_CMD
I2C commands.
void XMC_I2C_CH_SlaveTransmit(XMC_USIC_CH_t *const channel, const uint8_t data)
enum XMC_I2C_CH_INPUT XMC_I2C_CH_INPUT_t
I2C input stage selection.
#define USIC_CH_PSR_IICMode_SLSEL_Msk
#define USIC_CH_PCR_IICMode_RSCRIEN_Msk
#define USIC_CH_PCR_IICMode_SRRIEN_Msk
__STATIC_INLINE uint32_t XMC_I2C_CH_GetStatusFlag(XMC_USIC_CH_t *const channel)
#define USIC_CH_PSR_IICMode_RIF_Msk
void XMC_I2C_CH_MasterReceiveNack(XMC_USIC_CH_t *const channel)
enum XMC_I2C_CH_CMD XMC_I2C_CH_CMD_t
I2C commands.
__STATIC_INLINE void XMC_USIC_CH_SetInputSource(XMC_USIC_CH_t *const channel, const XMC_USIC_CH_INPUT_t input, const uint8_t source)
#define USIC_CH_PSR_IICMode_TBIF_Msk
#define USIC_CH_PSR_IICMode_ARL_Msk
__IO uint32_t PCR_IICMode
#define USIC_CH_PSR_IICMode_SCR_Msk
void XMC_USIC_CH_ConfigExternalInputSignalToBRG(XMC_USIC_CH_t *const channel, const uint16_t pdiv, const uint32_t oversampling, const XMC_USIC_CH_INPUT_COMBINATION_MODE_t combination_mode)
void XMC_I2C_CH_MasterTransmit(XMC_USIC_CH_t *const channel, const uint8_t data)
#define USIC_CH_PCR_IICMode_ERRIEN_Msk
#define USIC_CH_CCR_RIEN_Msk
void XMC_I2C_CH_MasterReceiveAck(XMC_USIC_CH_t *const channel)
void XMC_I2C_CH_EnableEvent(XMC_USIC_CH_t *const channel, uint32_t event)
__STATIC_INLINE void XMC_I2C_CH_DisableAcknowledgeAddress0(XMC_USIC_CH_t *const channel)
#define USIC_CH_PSR_IICMode_PCR_Msk
#define USIC_CH_PSR_IICMode_DLIF_Msk
__STATIC_INLINE void XMC_I2C_CH_DisableDataTransmission(XMC_USIC_CH_t *const channel)
#define USIC_CH_PSR_IICMode_ACK_Msk
#define USIC_CH_PSR_IICMode_SRR_Msk
enum XMC_USIC_CH_INPUT_COMBINATION_MODE XMC_USIC_CH_INPUT_COMBINATION_MODE_t
__STATIC_INLINE void XMC_I2C_CH_ClearStatusFlag(XMC_USIC_CH_t *const channel, uint32_t flag)